curl -LsSf https://langch.in/dcode | bash
# With model provider extras
# OpenAI, Anthropic, and Gemini are included by default
DEEPAGENTS_CODE_EXTRAS="nvidia,ollama" curl -LsSf https://langch.in/dcode | bash
Run:
dcode
The fastest way to start using Deep Agents. deepagents-code is a pre-built coding agent in your terminal — similar to Claude Code or Cursor — powered by any LLM that supports tool calling. One install command and you're up and running, no code required.
What deepagents-code adds on top of the SDK:
By default, dcode trusts the directory you run it in. Human-in-the-loop approval gates model-requested tool calls, but project artifacts are read before any approval prompt.
Do not run dcode in a directory you do not trust without a sandbox backend. For untrusted repositories, use a remote sandbox so execution is isolated from your machine. Running dcode in a directory lets that directory's files shape execution. See THREAT_MODEL.md for details.
See our Releases and Versioning policies.
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
For detailed information on how to contribute, see the Contributing Guide.
This project was primarily inspired by Claude Code, and initially was largely an attempt to see what made Claude Code general purpose, and make it even more so.
Classification that controls whether a command can skip the message queue.
A single slash-command definition.
A single autocomplete entry for the slash-command controller.
Complete set of semantic colors for one theme variant.
Metadata for a registered theme.
Classifier denial categories exposed to the agent and TUI.
One structured classifier decision for a proposed tool call.
Validated classifier response for one unresolved action batch.
Server-owned denial and availability counters for one thread.
Checkpoint-safe disposition for one gated call.
Private checkpoint record joining model output to after-model routing.
Server-owned provenance for one exclusively allocated scratch file.
Reducer update that creates or removes one exact artifact record.
Agent state carrying private Auto decisions and scratch provenance.
Trusted metadata attached by the Textual client to a user message.
Apply deterministic policy, classifier review, and HITL fallback.
Reject dynamically gated MCP calls when no approval UI exists.
Represents a pasted image with its base64 encoding.
Represents a pasted video with its base64 encoding.
Structured proposal returned by the criteria agent.
A new proposal or a rejection-based regeneration.
An amendment to an accepted goal; both extra fields are required.
Main-agent state carrying a criteria request until it is cleared.
Private per-invocation state for the nested criteria agent.
Run goal-criteria requests entirely inside the main server graph.
User-facing OAuth interaction surface shared by CLI and TUI.
Default OAuthInteraction that drives the flow via stdin/stdout.
Represents a queued user message awaiting processing.
Textual message carrying an external prompt or command.
An action deferred until the current busy state resolves.
Session state for the Textual app.
Posted whenever the chat's vertical scroll offset changes.
Posted whenever the bottom chrome's geometry changes.
Main Textual application for deepagents-code.
Posted by the background server-startup worker on success.
Posted by the background server-startup worker on failure.
Result from running the Textual application.
Middleware that provides an ask_user tool for interactive questioning.
Validate shell commands against an allow-list without HITL interrupts.
Stock HITL routing with an async live-mode read after model completion.
Raised when an external editor cannot be opened or read.
Path-safety and size limits for read-only repository inspection tools.
A different dcode entry point is winning on PATH than the one we upgraded.
A single package version change parsed from uv's environment-diff output.
Raised when uv tool requested requirements cannot be preserved.
Goal/rubric state channels shared by every schema that touches them.
Extends agent state with per-checkpoint facts restored on resume.
Persists per-checkpoint resume facts after each model call.
Read-only rubric view returned by the get_rubric tool to the model.
Read-only goal view returned by the get_goal tool to the model.
State fields used by goal tools.
Expose constrained goal tools and maintain the goal-state notice.
Unified parse result for dropped-path payload detection.
Track pasted images and videos in the current conversation.
Tool-approval policy selected for an interactive thread.
Stored approval-mode control payload.
Character set mode for TUI display.
Character glyphs for TUI display.
Global settings and environment detection for deepagents-code.
Why /trace found no LangSmith key, when an empty override is involved.
Offline snapshot of LangSmith tracing configuration for diagnostics.
Base class for typed LangSmith project URL lookup failures.
The langsmith package is not installed.
The LangSmith project URL lookup exceeded its hard timeout.
The LangSmith SDK call raised — auth, 404, network, etc.
The LangSmith project does not exist yet (lookup returned 404).
Result of creating a chat model, bundling the model with its metadata.
Metadata for a single MCP tool.
Metadata for a configured MCP server and its tools.
An MCP configuration file is malformed or structurally invalid.
Lazy, per-server cache of persistent MCP sessions.
A project MCP server row shown to the user and gated for trust.
A persisted API key credential.
A persisted OAuth subscription credential.
Result of a credential write that may have warnings to surface.
Result of a credential delete that may have warnings to surface.
How an option's raw env/TOML value is coerced to a typed value.
One user-tunable configuration option and where it can be set.
Declared context_schema for the agent graph.
Client-facing builder for the per-run graph context payload.
Line counts for a change, named so the pair cannot be swapped silently.
Revert agent edits to the managed onboarding-name memory block.
Canonical goal/rubric fields used for notices and fingerprints.
Metadata extracted from a canonical goal-state notice.
Raised when model configuration or creation fails.
Raised when no credentials are configured for any default-resolvable provider.
Raised when neither the app nor init_chat_model can infer a provider.
Raised when a provider is selected but its API key env var is unset.
Raised when a provider is selected but its LangChain package is not installed.
Credential readiness state for a model provider.
Origin of a CONFIGURED credential, used to discriminate display.
Credential readiness information for a provider.
A model specification in provider:model format.
Profile data for a model with override tracking.
Configuration for a model provider.
Parsed model configuration from config.toml.
A project-scoped, definition-bound MCP server approval.
User-level allow/deny lists for project MCP servers.
Coalesced thread-selector configuration read from a single TOML parse.
A transport-independent event delivered from outside the TUI.
Source of external events for the Textual app.
Line-delimited JSON event source over a local Unix domain socket.
Structured log record retained by the in-memory debug buffer.
Logging handler retaining the most recent structured records in memory.
Discriminator for ConfigResolutionError reasons.
Structured error returned when a login target cannot be resolved.
Successful resolution of a merged MCP config for login.
Resolved server config plus enough context for error messages.
Whether a probed path exists, is absent, or could not be read.
Swap the model or per-call settings from runtime.context.
Agent state extended with the cumulative thread-cost channel.
Own the thread's cumulative _session_cost_usd checkpoint value.
tool.use hook payload (schema documented in hooks).
tool.error hook payload (schema documented in hooks).
tool.result hook payload (schema documented in hooks).
In-progress state for a single streamed tool call.
Counts of buffered tool calls that never emitted a tool.use.
Deterministic chat model for integration tests.
Deterministic tool-calling model for auto-approve integration tests.
Exercise nested criteria generation with a repository read.
Parsed origin remote attribution for coding-agent-v1 traces.
OSC 9;4 progress states.
Stable identifiers for notification actions dispatched by the app.
One button/action row in the notification modal.
Typed payload for a missing-dependency notification.
Typed payload for an update-available notification.
A single notice waiting for user action.
In-memory store of pending notifications.
Token stats for a single model within a session.
Token and cost stats for one UsageKind bucket.
Usage returned after recording one streamed model message.
Stats accumulated over a single agent turn (or full session).
What a stream consumer last recorded for one request.
Active model configuration read from a tool runtime.
Add hook-aware automatic and explicit forced compaction for dcode.
A single choice option for a multiple choice question.
A question to ask the user.
Request payload sent via interrupt when asking the user questions.
Trusted same-turn authorization recorded after an ask_user response.
Widget result when the user submits answers.
Widget result when the user cancels the prompt.
Full configuration payload passed from the app to the server subprocess.
Raised when a downloaded archive fails SHA-256 verification.
Raised when no managed helper binary is available for this system.
Stored content for a collapsed paste.
A single labeled diagnostic fact.
A named group of related diagnostic items.
A single tool's display metadata.
A named group of tools sharing a source.
An MCP server that was discovered but currently exposes no tools.
Everything dcode tools list needs to render, in display order.
Data used to render HITL previews.
Line and byte level metrics for a file operation.
Track a single filesystem tool call.
Collect file operation metrics during an interaction.
Explicit user/project path context for project-sensitive behavior.
Nested-grader state used to scope verification-tool budgets.
Run a context-aware nested grader and retry transient transport failures.
Thread metadata returned by list_threads.
Metadata for a custom subagent loaded from filesystem.
Structured version facts for a single installed distribution.
Network-free snapshot of the version facts diagnostics need.
Raised when installed extras cannot be determined safely.
Install status for one optional dependency extra.
Resolved recovery action for a missing provider package.
A dangerous Unicode character found in text.
Safety analysis output for a URL string.
Parsed MCP server config entry.
File-backed TokenStorage under ~/.deepagents/.state/mcp-tokens/.
Raised when an MCP server needs interactive re-authentication.
State for local context middleware.
Inject local context (git state, project structure, etc.) into the system prompt.
Execute Hooks v2 invocations against one immutable snapshot.
Live client identity projected into every hook invocation.
Result of a lifecycle hook that may halt the caller.
Result of UserPromptSubmit, including its prompt rewrites.
Owns the Hooks v2 runtime, presenter, hook service, and transcripts.
One JSONL record in a materialized transcript projection.
Identity of a materialized transcript file.
Append-only JSONL transcript projections owned by the client process.
Collect completed stream messages into a Hooks transcript runtime.
Adapt hook invocations and handler output across the wire boundary.
Validated output and diagnostics from one command handler.
Persisted trust record for one canonical workspace root.
Versioned on-disk trust store for project-scoped hooks.
Decides whether project-scoped hooks may run in a given directory.
One ordered command handler in a configuration snapshot.
Matched handlers for one invocation.
Immutable, declaration-ordered Hooks v2 runtime configuration.
Supported hook handler executor kinds.
How non-JSON stdout is treated on a successful exit.
How exit code 2 is interpreted for an event.
How matching handler effects are combined.
Immutable capability description for one hook event.
Client-only materialization needed to build one hook wire envelope.
Client-owned session runtime around an immutable Hooks snapshot.
Deduplicate hook fulfillment for one client session.
LangGraph interrupt envelope for a server-owned hook invocation.
Callable that surfaces a user-visible hook notice.
Callable that updates hook-owned transient status text.
Lifecycle update for one running hook handler.
Present hook output consistently across interactive and headless clients.
Origin of the matcher groups contributed by one hooks document.
A project or user hooks file, which defines no variables.
Origin and environment for groups one enabled plugin contributed.
Validated configuration plus load diagnostics and source paths.
Raised when a client-owned hook stops lifecycle processing.
Client state required to create a domain hook invocation.
Execute client-owned events and apply their common side effects.
Client approval decision compatible with HITL resume payloads.
Normalized result shared by TUI and headless permission handling.
How one batch of gated tool calls was resolved by hooks.
Agent state extensions for server-owned hook middleware.
Emit server-owned lifecycle events over the hook interrupt transport.
Request sent for a server-owned hook invocation.
Response returned for a server-owned hook invocation.
Permission modes exposed by the compatible wire protocol.
Notification matcher values exposed on the wire.
Wire representation of model effort.
Permission rule returned by a hook.
Configuration scope targeted by a permission update.
Permission update that adds rules.
Permission update that replaces rules.
Permission update that removes rules.
Permission update that changes the active mode.
Permission update that adds allowed directories.
Permission update that removes allowed directories.
Background task snapshot exposed to hook handlers.
Scheduled session prompt exposed to hook handlers.
Fields common to every hook input.
Wire input for SessionStart.
Wire input for UserPromptSubmit.
Wire input for SessionEnd.
Wire input for PermissionRequest.
Wire input for Notification.
Wire input for PreToolUse.
Wire input for PostToolUse.
Wire input for PostToolUseFailure.
Wire input for PreCompact.
Wire input for Stop.
Wire input for SubagentStart.
Wire input for SubagentStop.
Event-specific output for SessionStart.
Event-specific output for UserPromptSubmit.
Event-specific output for PreToolUse.
Permission-request output that allows a tool call.
Permission-request output that denies a tool call.
Event-specific output for PermissionRequest.
Event-specific output for PostToolUse.
Event-specific output for PostToolUseFailure.
Event-specific output for Stop.
Event-specific output for SubagentStart.
Event-specific output for SubagentStop.
Compatible hook output with retained extension fields.
Configuration for a synchronous command hook.
A matcher and its ordered hook handlers.
Top-level configuration grouped by hook event.
Supported hook lifecycle events.
Process responsible for originating an event.
Reason a session-start event occurred.
Reason a session-end event occurred.
dcode lifecycle notifications with compatible wire mappings.
Reason context compaction was requested.
Native tool-call data used by hook lifecycle owners.
Resolved subagent identity.
A notification emitted by a dcode lifecycle owner.
Background task state captured for a hook invocation.
Scheduled session prompt captured for a hook invocation.
Context shared by every domain hook event.
Domain payload for SessionStart.
Domain payload for UserPromptSubmit.
Domain payload for SessionEnd.
Domain payload for PermissionRequest.
Domain payload for Notification.
Domain payload for PreToolUse.
Domain payload for PostToolUse.
Domain payload for PostToolUseFailure.
Domain payload for PreCompact.
Domain payload for Stop.
Domain payload for SubagentStart.
Domain payload for SubagentStop.
A domain hook event with its invocation context.
Structured diagnostic produced while processing a hook.
Normalized permission result from hook processing.
Fields common to every event-specific hook decision.
Decision returned for SessionStart.
Decision returned for UserPromptSubmit.
Decision returned for SessionEnd.
Decision returned for PermissionRequest.
Decision returned for Notification.
Decision returned for PreToolUse.
Decision returned for PostToolUse.
Decision returned for PostToolUseFailure.
Decision returned for PreCompact.
Decision returned for Stop.
Decision returned for SubagentStart.
Decision returned for SubagentStop.
Normalized effect produced by one hook handler.
Raised when a marketplace cannot be loaded.
Raised when a plugin manifest is malformed enough to skip the plugin.
Raised when existing plugin state cannot be safely modified.
Local directory or JSON file used as a marketplace source.
GitHub or Git repository used as a marketplace source.
Marketplace manifest downloaded from an HTTP URL.
Parsed plugin manifest.
Inventory of supported plugin components.
A discovered plugin ready to feed dcode adapters.
A plugin stored relative to its marketplace.
A plugin sourced from a GitHub repository.
A plugin sourced from a subdirectory in a Git repository.
A plugin sourced from a Git repository URL.
A catalog entry from a marketplace manifest.
A parsed marketplace manifest.
Persisted marketplace source record.
Install record for a plugin.
Result from plugin discovery.
Load namespaced plugin skills without extending the SDK source API.
Outcome of a revoke_skill_dir_trust call.
Extended skill metadata for CLI display, adds source tracking.
Structured prompt and checkpoint metadata for a skill invocation.
A tool.result payload held back until the authoritative result arrives.
A validated rubric_evaluation_end event forwarded to the caller.
Adapter for rendering agent output to Textual widgets.
Ask whether to compact a just-resumed thread before the next turn.
Arrow-key navigable plugin manager for /plugins.
Posted when a plugin manager tab label is clicked.
Mouse-clickable tab label in the plugin manager header.
Compact welcome banner shown at startup.
In-TUI first-run notice describing what Auto mode does.
Captured stdout printed during a js_eval evaluation.
A successful js_eval evaluation result.
An error raised during a js_eval evaluation.
Resolve an inline prompt result at most once.
Soft-wrapping text input shared by inline prompts.
Posted when the user presses Enter to submit text.
Render a selectable inline-prompt option with a cursor.
Modal dialog for managing warning preferences.
Types of messages in the chat.
Status of a tool call.
In-memory message data for virtualization.
Manages message data and widget window for virtualization.
Approval overlay for a skill resolving outside trusted directories.
Free-form answer input for ask-user questions.
Posted when the user presses Enter to submit an ask-user answer.
Interactive widget for asking the user questions.
Message sent when user submits all answers.
Message sent when user cancels the ask_user prompt.
A clickable model option in the selector.
Message sent when a model option is clicked.
Full-screen modal for model selection.
TextArea that detects paste-like keystroke bursts.
Paste-aware text area that collapses large pastes into placeholders.
Modal that shows self-update progress and a bounded log tail.
Result of formatting tool output for display.
Widget displaying a user message.
Posted when the collapsed-body expansion state changes.
Widget displaying a queued (pending) user message in grey.
Widget displaying a skill invocation with collapsible body.
Widget displaying an assistant message with markdown support.
Widget displaying a tool call with collapsible output.
Collapsed one-line stand-in for an assistant step's tool calls.
Widget displaying a diff with syntax highlighting.
Widget displaying an error message.
Compact grader result with complete, scrollable details on demand.
Posted when the grader-details expansion state changes.
Widget displaying an app message.
Widget displaying a summarization completion notification.
Dismissal payload identifying which action the user picked.
Posted when a notification row is clicked with the mouse.
Posted when the user picks SUPPRESS from a notification's detail modal.
Posted for an action that opens a follow-up modal in place.
Modal listing pending notifications with drill-in details.
Modal dialog for switching between available agents.
Result of handling a key event in the completion system.
Protocol for views that can display completion suggestions.
Protocol for completion controllers.
Controller for / slash command completion.
Controller for @ file completion with fuzzy matching from current cwd.
Manages multiple completion controllers, delegating to the active one.
Modal dialog for selecting a reasoning effort level.
A label that displays a model name, right-aligned with smart truncation.
A label that displays the git branch with glyph-aware truncation.
Status bar showing mode, cwd, tokens with cost, and the active model.
Ask before changing agents to resume a thread.
Posted when an _ActionOption is clicked with the mouse.
Modal displaying a single notification's title, body, and actions.
The closed set of LangSmith region selections in the /auth prompt.
Outcome of resolving the region selector to an endpoint to persist.
Outcome of an AuthPromptScreen interaction.
Confirm before launching an authentication flow for a model.
Confirmation overlay shown before clearing a stored credential.
Modal that captures and persists an API key for one provider.
Modal that lists configured providers and lets the user manage keys.
Posted when a key prompt successfully persists credentials.
Posted when a key prompt deletes stored credentials.
Keep the current goal and lifecycle state visible above the input.
Raised by MCPLoginScreen.action_cancel when the user cancels the flow.
Modal that renders the OAuth login flow and collects user input.
Approval menu using standard Textual patterns.
Message sent when user makes a decision.
Modal asking whether to switch cwd when resuming or switching to a thread.
Ask how project hooks in a newly entered workspace should be trusted.
Manages command history with file persistence.
Modal asking whether to restart the server after an MCP login.
Modal asking whether to reconnect after /mcp disable/enable toggles.
Confirmation overlay for /mcp reconnect --force with no pending login.
Modal asking whether to restart the server for a spawn-time change.
Confirmation overlay before /update --deps upgrades dcode itself.
Confirmation overlay for a dependency refresh.
A single row in the console's session snapshot.
Modal showing a session snapshot and a live tail of recent log records.
Outcome of the YOLO first-enable notice.
In-TUI acknowledgement shown before unrestricted YOLO becomes active.
Posted when the changelog row is clicked with the mouse.
Modal dedicated to the update-available notification.
A selectable tool item in the MCP viewer.
Read-only modal for a failed MCP server's error details.
A selectable server-header row in the MCP viewer.
Modal viewer for active MCP servers and their tools.
Confirmation overlay for installing an arbitrary --package.
Confirmation overlay for installing a model provider's extra.
A clickable completion option in the autocomplete popup.
Message sent when a completion option is clicked.
Small clickable button shown at the right edge of the chat input row.
Message sent when an input action button is clicked.
Popup widget that displays completion suggestions as clickable options.
Message sent when a completion option is clicked.
TextArea subclass with custom key handling for chat input.
Message sent when text is submitted.
Request previous history entry.
Request next history entry.
Message sent when paste payload resolves to file paths.
Message sent when a paste is large enough to be collapsed.
Posted when the user presses a printable key or backspace.
Chat input widget with prompt, multi-line text, autocomplete, and history.
Message sent when input is submitted.
Message sent when input mode changes.
Posted when the user presses a printable key or backspace in the input.
Base class for tool approval widgets.
Generic approval widget for unknown tools.
Approval widget for write_file - shows file content with syntax highlighting.
Approval widget for edit_file - shows clean diff with colors.
A clickable thread option in the selector.
Message sent when a thread option is clicked.
Emit scroll changes so the parent can refresh the overflow indicator.
Message sent when the controls pane scroll position changes.
Confirmation modal shown before deleting a thread.
Options dropdown overlay that consumes option navigation while focused.
Options dropdown that keeps focus contained while its menu is open.
Modal dialog for browsing and resuming threads.
Strategy for building a tool's HITL approval widget.
Renderer for write_file tool - shows full file content.
Renderer for task tool — interrupt description provides full context.
Renderer for delete tool - shows removed file content when available.
Renderer for edit_file tool - shows unified diff.
Docked two-pane panel visualizing js_eval subagent fan-out by phase.
Ask whether to reload after leaving the plugin manager.
Animated spinner using charset-appropriate frames.
Animated loading indicator with status text and elapsed time.
One-time choice for how Auto mode handles generated goal criteria.
Onboarding screen that asks for the user's name.
Onboarding screen that summarizes installed optional integrations.
Widget result when the generated criteria are accepted unchanged.
Widget result when the user submits revised criteria.
Widget result when the user rejects criteria with feedback.
Widget result when the user cancels the proposal.
Text input that keeps goal-review edit keystrokes inside the editor.
Posted when the user presses Enter to submit goal-review text.
Posted when Escape should leave goal criteria edit mode.
Inline review widget for generated goal acceptance criteria.
Message sent when the user accepts, edits, or cancels.
One startup tip displayed above the chat input.
Run the ChatGPT OAuth Authorization Code Flow with PKCE inline.
Outcome of the CodexSignedInScreen quick-action overlay.
Quick-action overlay shown when openai_codex is already signed in.
Modal dialog for theme selection with live preview.
Slack-hosted MCP: loopback Authorization Code with a public client.
Outcome of a provider's pre-handshake run_login step.
Base class for provider-specific OAuth dispatch.
Fallback provider for spec-compliant MCP servers with no quirks.
GitHub-hosted MCP: RFC 8628 Device Authorization Grant.
Merged view of built-in, entry-point, and config sandbox providers.
Snapshot of the ChatGPT OAuth login state.
Raised when the user cancels a sign-in flow mid-callback wait.
Raised when a stored ChatGPT token cannot be refreshed.
UI hooks for the browser loopback sign-in flow.
Configuration for a single config-declared sandbox provider.
Parsed [sandboxes] configuration from config.toml.
How to install the package that provides a sandbox backend.
Static description of a sandbox provider used by the registry.
Base error for sandbox provider operations.
Raised when the requested sandbox cannot be found.
Interface for creating and deleting sandbox backends.
Raised when the HITL interrupt loop exceeds _MAX_HITL_ITERATIONS rounds.
A tool call whose tool.use has fired but whose result has not arrived.
Mutable state accumulated while iterating over the agent stream.
Best-effort background LangSmith thread URL lookup state.
Client that talks to a LangGraph server over HTTP+SSE.
Manages a langgraph dev server subprocess.
An option paired with its resolved effective value, for display.
Return autocomplete entries for slash commands.
Extract skill name and args from a /skill:<name> command.
Build autocomplete entries for discovered skills.
Return the read-only theme registry, building it on first access.
Rebuild the theme registry from disk.
Return custom CSS variable defaults for the given mode.
Return the ThemeColors for the active Textual theme.
Build the plain-text output for the --version CLI flag.
Check if optional dependencies are installed.
Check for recommended external tools and return missing tool names.
Build a PendingNotification for a missing optional tool.
Format a missing-tool warning for non-interactive console output.
Parse command line arguments.
Run the Textual TUI interface (async version).
Read piped stdin and merge it into the parsed CLI arguments.
Entry point for console script.
Resolve ${VAR} references in one MCP server's supported fields.
Build trusted classifier metadata for a client-created user message.
Return whether an MCP tool has coherent read-only annotations.
Return whether a tool carries dcode's MCP wrapper marker.
Return MCP names that require Manual or Auto review.
Return a compact reason safe for persistence, logs, and UI rendering.
Build a safe agent/UI reason for a failed auto classifier call.
Create a private OS-temp text file for this request.
Delete one exact OS-temp artifact created for this request.
Remove display-only media placeholders from user text.
Attempt to read an image from the system clipboard.
Read and encode an image file from disk.
Read and encode a video file from disk.
Return whether a path's extension is a known image or video extension.
Try to load a file as an image first, then as a video.
Encode raw bytes to a base64 string.
Create multimodal message content with text, images, and videos.
Create the ephemeral server-side criteria agent graph.
Create the goal-only fallback agent for criteria generation.
Classify a raw env-var string as a truthy, falsy, or unrecognized token.
Return whether env var name is set to a recognizably truthy value.
Persist theme preference to ~/.deepagents/config.toml.
Persist a [ui.terminal_themes][term_program] = name entry.
Run the Textual application.
Load async subagent definitions from config.toml.
Return a sorted list of available agent names from ~/.deepagents/.
List all available agents.
Reset an agent to default or copy from another agent.
Build the ### Model Identity section for the system prompt.
Get the base system prompt for the agent.
Create a CLI-configured agent with flexible options.
Resolve editor command from environment.
Open current_text in an external editor.
Add a --json flag to an argparse parser.
Write a JSON envelope to stdout and flush.
Return whether offload history is routed to non-persistent storage.
Remove a thread's offloaded conversation-history archive.
Return whether installed package metadata is at least version.
Check for updates using only a fresh local cache entry.
Return the epoch time of the last PyPI update check, or None.
Return whether a recorded check stamp is still within CACHE_TTL.
Fetch the latest deepagents-code version from PyPI, with caching.
Return the targeted pre-release pins installing version requires.
Return whether installing version needs uv pre-release admission.
Return the cached ISO-8601 upload time for version, or None.
Return a human-readable age for version (e.g., 'released 3d ago').
Return ", released Nd ago" for version, or "" when unknown.
Return " (released Nd ago)" for version, or "" when unknown.
Return " (N days old)" for installed versions at least a week old.
Return whole days since the installed version's release, or None.
Return whether an older installed version should warn about updating.
Return the ISO-8601 upload time for deepagents SDK version.
Return a human-readable age for SDK version (e.g., 'released 3d ago').
Return ", released Nd ago" for SDK version, or "" when unknown.
Return whether a resumed session is still in its update grace period.
Reset the resume grace period after a normal interactive launch.
Return whether startup auto-update should skip a recently failed version.
Persist a same-version startup auto-update retry cooldown marker.
Clear a startup auto-update failure marker for version if present.
Return whether the user should be notified about version latest.
Record that the user was notified about version latest.
Clear the "already notified" marker so the update modal re-opens next launch.
Check whether a newer version of deepagents-code is available.
Detect how deepagents-code was installed.
Return the shell command to upgrade deepagents-code.
Return whether pre-release upgrades are supported for the install method.
Return whether a dependency-only refresh is possible for the install.
Return the shadowing dcode entry point on the user's PATH, if any.
Best-effort detect_shadowed_dcode that never raises.
Render a user-facing warning for a shadowed-dcode situation.
Return a session-scoped shell command to prefer the upgraded shim.
Remove old update logs while preserving the newest recent logs.
Return a new timestamped update log path and clean stale logs.
Attempt to upgrade deepagents-code using the detected install method.
Refresh dependencies while keeping deepagents-code on this version.
Resolve a dependency refresh plan without mutating the tool environment.
Parse package version changes from uv's environment-diff output.
Render dependency changes as an aligned, human-readable block.
Return whether extra is safe to embed in package-extra syntax.
Return whether package is safe to embed in a --with install command.
Return the uv command that upgrades dcode while clearing stale pins.
Return the uv command that refreshes deps for the current dcode version.
Return the uv command that plans a dependency refresh without installing.
Return the shell command that adds a package to the dcode tool env.
Return the install-script command that installs dcode extras.
Return the install-script command that adds extra to dcode.
Return a manual recovery command for the current install method.
Return a manual recovery command, never raising.
Return the canonical action hint for editable installs missing an extra.
Return the canonical action hint for editable installs needing a package.
Add extra to the installed dcode tool environment.
Add an arbitrary package to the installed dcode tool environment.
Return whether update checks are enabled.
Return whether auto-update is enabled.
Persist the auto-update preference to config.toml.
Return whether the user explicitly chose an auto-update preference.
Return whether to show the one-time auto-update default migration notice.
Record that the one-time auto-update default migration notice was shown.
Return the last version the user saw the "what's new" banner for.
Record that the user has seen the "what's new" banner for version.
Return True if this is the first launch on a newer version.
Narrow a persisted proposal kind to a known value.
Narrow a persisted goal-status value to a known GoalStatus.
Return the ordered reasoning effort levels supported by model_spec.
Return the profile's reasoning effort default independently of its levels.
Return whether effort is a supported level for model_spec.
Return whether canonical or native effort parameters are present.
Read canonical or native effort settings using integration precedence.
Remove canonical and native effort settings without changing siblings.
Replace existing effort settings with the standard flat parameter.
Read criteria when the latest state notice says a rubric is active.
Read a goal when the latest state notice says it is actionable.
Update a goal only when the latest state notice says it is actionable.
Extract @file mentions and return the text with resolved file paths.
Parse a paste payload that may contain dragged-and-dropped file paths.
Parse dropped-path payload variants through one entrypoint.
Return whether a payload has the shape a terminal uses for a file drop.
Return resolved file paths from a payload that looks like a file drop.
Parse and resolve a single pasted path payload.
Extract and resolve a leading pasted path token from input text.
Normalize pasted text that may represent a single filesystem path.
Return a validated mode, failing closed to manual.
Return the next Shift+Tab approval mode for the active session.
Return the store key for a thread's live approval mode.
Return the stored approval-mode payload.
Read a live approval mode from the server-side LangGraph Store.
Asynchronously read a live approval mode from a LangGraph Store.
Persist approval mode through an agent's remote store client.
Return the installation-local acknowledgement file path.
Return whether the current unrestricted-mode warning was accepted.
Persist the current unrestricted-mode warning acknowledgement.
Return whether the current Auto first-enable notice was already shown.
Persist that the Auto first-enable notice was shown.
Resolve the configured runtime logging level.
Configure runtime log level and optional file logging for target.
Return the path of the active debug log file, or None if not logging.
Resolve a LangSmith endpoint shorthand to its canonical URL.
Return whether value is a non-empty http/https URL with a host.
Return and clear the pending orphaned-tracing notice, if any.
Restore caller tracing flags in an environment passed to user code.
Restore caller tracing API keys in an environment passed to user code.
Apply a /auth-stored LangSmith key, tracing, and redaction now.
Return the longest mode prefix and mode for text, if any.
Get the glyph set for the current charset mode.
Reset the glyphs and charset-mode caches (for testing).
Check whether the terminal is in ASCII charset mode.
Return the terminal-appropriate label for the newline keyboard shortcut.
Get the appropriate banner for the current charset mode.
Build the shared coding-agent-v1 trace-metadata block.
Build the LangGraph stream config dict.
Parse shell allow-list from string.
Check if a command contains dangerous shell patterns.
Check if a shell command is in the allow-list.
Resolve the LangSmith project name if tracing is configured.
Report an empty prefixed override that is suppressing a LangSmith key.
Return whether LangSmith secret redaction is enabled for agent traces.
Return whether the agent should proactively save learnings to memory.
Return whether Shift+Tab may enter unrestricted YOLO mode.
Return whether OpenAI model calls should carry a per-thread cache key.
Resolve the Auto classifier spec and any reason it was ignored.
Resolve the model spec the Auto approval classifier should use.
Resolve whether Auto mode applies generated goal criteria without review.
Install the LangSmith SDK secret anonymizer for active agent tracing.
Extra LangSmith project names to dual-write agent traces to.
The single extra LangSmith project to mirror agent runs to, if configured.
Summarize LangSmith tracing configuration for diagnostics.
Fetch the LangSmith project URL, raising on any failure.
Fetch the LangSmith project URL, returning None on any failure.
Build a full LangSmith thread URL if tracing is configured.
Build a LangSmith thread URL only when its project URL is cached.
Reset the LangSmith URL cache (for testing).
Get the default coding agent instructions.
Auto-detect provider from model name.
Create a chat model.
Validate that the model has required capabilities for deepagents.
Load and validate MCP configuration from a JSON file.
Infer the project root that owns a project-level MCP config path.
Return only the project servers that survive the user's trust policy.
Find MCP config files from standard locations.
Split discovered config paths into user-level and project-level configs.
Extract stdio server entries from a parsed MCP config.
Return a ProjectServerSummary for every server in a project config.
Merge multiple MCP config dicts by server name.
Load a single MCP config file, returning None on any error.
Load and validate project configs after resolving precedence.
Load an MCP config file, returning (config, error).
Load MCP tools from a configuration file.
Resolve MCP config and load tools.
Report a server graph startup failure to the parent app process.
Return the resolved path to the credential store (auth.json).
Return all stored credentials keyed by provider name.
Return the stored API key for provider, or None if unset.
Return the base URL paired with provider's stored key, or None.
Return the LangSmith project paired with provider's stored key, or None.
Persist an API key for provider.
Remove a stored credential for provider.
Return providers that currently have a stored credential, sorted.
Return the set of server names the user has disabled.
Return True when server_name is in the disabled set.
Add or remove server_name from the persistent disabled set.
Load ~/.deepagents/config.toml.
Resolve an option against the environment then config.toml.
Resolve the [interpreter] options into Settings constructor kwargs.
Resolve the Auto classifier decision-batch budget and its source.
Resolve the wall-clock budget for one Auto classifier decision batch.
Resolve the effective main-agent recursion_limit.
Return the deepagents-code extra that installs provider, if known.
Return the PyPI distribution that provides provider, if known.
Return whether provider's integration package is importable.
Return every option, credentials-first then by domain group.
Return the manifest entry for key, or None when unknown.
Return every manifest key in definition order.
Return every option whose key sits under the dotted prefix section.
Return group names from options in first-seen order.
Return whether a diff line is the truncation marker.
Split a unified diff back into the lines it was assembled from.
Locate paired file headers immediately preceding a hunk.
Count added and removed lines in unified-diff lines.
Return ordinary text from a local or serialized message.
Return message metadata from a local or serialized message.
Return a message's lc_source value when present.
Return whether a local or serialized message has the human role.
Return whether a message is a goal-state notice or continuation.
Return whether a message claims to be a goal-state notice.
Return whether the latest human turn carries an unsaved goal fallback.
Return whether a message should be omitted from derived transcripts.
Return whether a message is hidden from user-facing session history.
Build a one-time goal continuation.
Project authoritative channels into deterministic notice state.
Serialize authoritative notice state with canonical JSON formatting.
Return a stable digest for authoritative goal/rubric state.
Return whether state contains a goal or an active rubric.
Build one canonical append-only goal/rubric state notice.
Return validated canonical notice metadata from a message.
Return the newest valid notice and its raw-history index.
Return the newest goal-state source index, including invalid messages.
Allow successful prefixed environment resolutions to be logged again.
Return whichever env var name actually carries the resolved value.
Look up an env var with DEEPAGENTS_CODE_ prefix override.
Return the OS-appropriate cache directory for Deep Agents Code.
Reset module-level caches so the next call recomputes from scratch.
Get available models dynamically from installed LangChain provider packages.
Load upstream profiles merged with config.toml overrides.
Resolve the credential value for provider from any configured source.
Return credential readiness details for a provider.
Check if credentials are available for a provider.
Return the env var name that holds credentials for a provider.
Return base-URL env var names for a provider in resolution order.
Return the canonical base-URL env var name for a provider.
Return the env var that supplies a provider's endpoint when none is stored.
Return whether name is a non-model service configurable via /auth.
Return whether name is the LangSmith tracing service.
Return credential readiness for a non-model service (e.g. "tavily").
Export every stored service key into os.environ.
Export this provider's stored key and endpoint into os.environ.
Log when a provider's key and endpoint resolve from different env tiers.
Persist whether Auto mode applies generated goal criteria without review.
Update the default model in config file.
Remove the default model from the config file.
Persist the selected reasoning effort for a model.
Load the selected reasoning effort for a model.
Remove the selected reasoning effort for a model.
Check if a warning key is suppressed in the config file.
Add a warning key to the suppression list in the config file.
Remove a warning key from the suppression list in the config file.
Normalize an exact project root for persisted MCP trust comparisons.
Return a stable fingerprint for an MCP server definition.
Load per-server project MCP allow/deny lists from user-level config.
Persist project-scoped MCP server approvals.
Load all thread-selector settings from one config file read.
Clear the cached ThreadConfig so the next load re-reads disk.
Load thread column visibility from config file.
Save thread column visibility to config file.
Load the relative-time display preference for thread timestamps.
Save the relative-time display preference for thread timestamps.
Load the sort order preference for the thread selector.
Load the default startup approval mode from config.toml.
Save the sort order preference for the thread selector.
Save the directory-scope preference for the thread selector.
Update the recently used model in config file.
Read the most-recent-first list of provider:model specs.
Promote model_spec to the front of the recent-models MRU list.
Update the recently used agent in config file.
Read [agents].recent from the config file.
Update the default agent in config file.
Remove the default agent from the config file.
Read [agents].default from the config file.
Return the default per-process Unix socket path.
Decode one newline-delimited JSON external event.
Argparse type for integer arguments that must be >= 1.
Argparse type for integer arguments that must be >= 0.
Show top-level help information.
Show help information for the list subcommand.
Show help information for the agents subcommand.
Show help information for the reset subcommand.
Show help information for the skills subcommand.
Show help information for the plugin / plugins subcommand.
Show help information for the skills list subcommand.
Show help information for the skills create subcommand.
Show help information for the skills info subcommand.
Show help information for the skills delete subcommand.
Show help information for the skills trust subcommand.
Show help information for the update subcommand.
Show help information for the doctor subcommand.
Show help information for the tools subcommand.
Show help information for the tools list subcommand.
Show help information for the tools install subcommand.
Show help information for the install subcommand.
Show help information for the mcp subcommand.
Show help information for the mcp login subcommand.
Show help information for the mcp config subcommand.
Show help information for the config command.
Show help information for the auth subcommand.
Show help information for the threads subcommand.
Show help information for the threads delete subcommand.
Show help information for the threads list subcommand.
Return whether the attached terminal should be treated as kitty-aware.
Return the bounded retention bucket key for a log level name.
Attach the in-memory buffer handler to target (idempotent).
Return the installed buffer handler.
Resolve an MCP config dict for login without printing anything.
Pull server out of a resolved config and validate its shape.
Build the CLI-style hint for an unreadable user trust policy.
Build the CLI-style hint string for skipped project server entries.
Build the CLI-style hint for servers dropped by the legacy-key removal.
Build the CLI-style hint for the renamed, now-ignored env var.
Build the CLI-style hint for dropped malformed saved approvals.
Build the CLI-style hint for discovered configs that failed to load.
Classify a path as existing, missing, or unreadable.
Report whether genai-prices is currently able to price a request.
Estimate one model request's cost in USD from LangChain usage metadata.
Resolve the model and provider attached to a streamed model message.
Map a raw ToolMessage.status to the two-value hook domain, fail-closed.
Compute a stable key for buffering an in-progress streamed tool call.
Classify buffered tool calls that never emitted a tool.use.
Build the tool.use hook payload (schema documented in hooks).
Build the tool.error hook payload (schema documented in hooks).
Build the tool.result hook payload (schema documented in hooks).
Locate the effective git metadata directory for a path.
Locate the repository root for a path.
Resolve a validated identity shared by one repository's Git worktrees.
Read the current git branch from repository metadata.
Fall back to git rev-parse for unusual repository layouts.
Resolve the current git branch with a filesystem-first strategy.
Read the current HEAD commit SHA from repository metadata.
Fall back to git rev-parse HEAD for unusual repository layouts.
Resolve the current HEAD commit SHA, filesystem-first.
Read the origin remote URL from the repository config file.
Fall back to git config --get remote.origin.url.
Resolve the origin remote URL, filesystem-first.
Derive repository attribution from an origin remote URL.
Best-effort write of a terminal control sequence.
Write an OSC <command>;<payload> sequence.
Set the terminal's OSC 9;4 progress indicator.
Clear the terminal's progress indicator.
Set the terminal's dynamic default background color with OSC 11.
Reset the terminal's dynamic default background color with OSC 111.
Classify a streamed model request for cost and usage breakdowns.
Close every request in a ledger that outlives its stream round.
Record usage attached to one streamed model message.
Format a token count into a human-readable short string.
Format an estimated USD cost for compact display.
Print a model-usage stats table to a Rich console.
Return the command name this process was launched with.
Note a non-standard launch name in the Debug Console, once per process.
Get the current Deep Agents thread ID for LangSmith or MCP tooling.
Search the web for current information.
Fetch a URL and return the page content as markdown.
Restore iTerm2 cursor guide when launch-time profile state required it.
Render the placeholder answer recorded for every question on failure.
Render questions and answers as the Q:/A: transcript.
Return the managed ripgrep binary path (.exe on Windows).
Return whether managed-tool downloads are disabled via env var.
Return the configured ripgrep installer mode.
Return whether the user opted into the system ripgrep installer.
Idempotently prepend BIN_DIR to os.environ["PATH"].
Ensure a usable rg binary is available, installing if necessary.
Return the number of newline characters in text.
Return whether text should be collapsed into a placeholder.
Format a paste placeholder reference string.
Replace all paste placeholders in text with their full content.
Format a duration in seconds into a human-readable string.
Read macOS's "24-Hour Time" preference (AppleICUForce24HourTime).
Whether the system is configured for a 24-hour clock.
Format a message timestamp for display.
Move legacy state entries from config_dir into state_dir.
Gather every diagnostic section in display order.
Run dcode doctor, printing diagnostics as text or JSON.
Return the (status_label, detail) display pair for an unavailable server.
Enumerate the built-in tools the agent binds by default.
Read tools from a local compiled agent when its graph is inspectable.
Discover MCP servers, split into tool groups and unavailable servers.
Split loaded MCP server metadata into tool groups and unavailable servers.
Assemble a ToolCatalog from pre-collected built-in tools and live MCP info.
Collect everything dcode tools list renders.
Return what a successful file operation could not show, if anything.
Return display_caveat for a successful completed record.
Compute a unified diff between before and after content.
Convert a virtual/relative path to a physical filesystem path.
Return whether a path points at a credential/secret file.
Format a path for display.
Collect summary info and diff for HITL approvals.
Return the first-run onboarding marker path.
Return whether the user has completed onboarding.
Persist that onboarding has completed.
Return the goal criteria preference prompt marker path.
Return whether the goal criteria preference prompt was answered.
Persist that the goal criteria preference prompt was answered.
Persist the optional onboarding name into user agent memory.
Return the managed onboarding name block (markers included) if present.
Remove every onboarding-name marker occurrence from text.
Return whether onboarding should open at interactive startup.
Read the server project context from environment transport data.
Find the project root by looking for git metadata.
Find project-specific AGENTS.md file(s).
Format ISO timestamp for display (e.g., 'Dec 30, 6:10pm').
Format ISO timestamp as relative time (e.g., '5m ago', '2h ago').
Format a filesystem path for display.
Get path to global database.
Generate a new thread ID as a full UUID7 string.
List threads from checkpoints table.
Populate checkpoint-derived fields for an existing thread list.
Prewarm thread selector cache for faster /threads open.
Get cached recent threads, if available.
Apply cached message counts onto thread rows when freshness matches.
Apply cached initial prompts onto thread rows when freshness matches.
Get the most recent thread, optionally agent-filtered and/or excluding a thread.
Get agent_name for a thread.
Get the most recently stored cwd for a thread.
Check if a thread exists in checkpoints.
Find threads whose IDs start with the given prefix.
Delete thread checkpoints and any offloaded conversation history.
Get AsyncSqliteSaver for the global database.
Read the thread listing limit from DA_CLI_RECENT_THREADS.
CLI handler for deepagents threads list.
CLI handler for: deepagents threads delete.
Normalize line breaks and escape markdown syntax in external text.
List subagents from user and/or project directories.
Copy text to the system clipboard.
Copy text to the clipboard and surface the outcome as a toast.
Copy selected text from one screen's widgets to the clipboard.
Collect version facts for the running deepagents-code distribution.
Collect version facts for the installed deepagents SDK distribution.
Return the base deepagents requirement declared by deepagents-code.
Collect the offline version report used by --version, /version, and doctor.
Return the source/metadata drift annotation for the CLI version line.
Return the workspace/editable/drift/mismatch SDK version annotation.
Resolve the diagnostic deepagents SDK version.
Render the installable extras grouped by category as plain text.
Return installed optional dependencies grouped by extra.
Return extras with at least one installed dependency.
Return installed and missing optional dependencies grouped by extra.
Return the installable extra that declares a package.
Resolve how to recover from a missing provider package.
Check that langchain-quickjs is installed for the interpreter.
Render an ExtrasStatus mapping as column-aligned plain text.
Return (package, version) pairs for the core ecosystem dependencies.
Render core ecosystem dependency versions as column-aligned plain text.
Render core ecosystem dependency versions as a markdown fragment.
Render an ExtrasStatus mapping as a markdown fragment.
Detect deceptive or hidden Unicode code points in text.
Remove known dangerous/invisible Unicode characters from text.
Neutralize control characters and deceptive Unicode in untrusted text.
Render hidden Unicode characters as explicit markers.
Summarize Unicode issues for warning messages.
Join safety warnings into a display string with overflow indicator.
Check a URL for suspicious Unicode and domain spoofing patterns.
Flatten nested dict/list structures into key-path/string pairs.
Return whether a key path suggests URL-like content.
Format an auth manager badge for a provider.
Format a model selector provider-header indicator.
Resolve environment-variable references in MCP header values.
Construct an OAuthClientProvider for an MCP server.
Return a token-safe single-line summary of an OAuth-login exception.
Find an MCPReauthRequiredError anywhere inside exc's tree.
Return the resource_metadata URL of a 401 OAuth challenge in exc.
Drive OAuth login for server_name, persisting tokens on success.
Truncate a string value if it exceeds max_length.
Format tool calls for display with tool-specific smart formatting.
Convert ToolMessage content into a printable string.
Concatenate all section functions into the full detection script.
Fire matching hook commands with payload serialized as JSON on stdin.
Schedule dispatch_hook as a background task with a strong reference.
Return whether fire-and-forget hook tasks are still in flight.
Await all in-flight fire-and-forget hook tasks.
Convert legacy dotted-event hook entries into Hooks v2 configuration.
Return whether data looks like the legacy list-shaped hooks document.
Redact secret-like strings inside transcript content.
Run one hook command with bounded time and captured output.
Return whether project hooks are trusted for a canonical workspace root.
Persist project-hook trust for a workspace root.
Resolve the workspace root that governs hook trust for a directory.
Return the capability entry for event.
Reduce ordered handler results into an event-specific decision.
Execute a server-owned hook request and return a resume payload.
Fulfill a raw interrupt value when it is a hook invocation.
Fulfill pending hook interrupts into a resume map keyed by interrupt id.
Project a native hook invocation into the compatible wire contract.
Serialize a hook invocation as validated compatible JSON.
Return the compatible notification matcher and wire value.
Build an inherited environment safe to pass to hook subprocesses.
Format a compatible MCP wire tool name.
Map a native tool name to the compatible wire tool name.
Map native tool arguments to the compatible wire input object.
Project a native tool call into compatible wire name and input.
Serialize a hook invocation request for interrupt().
Parse a hook invocation interrupt payload when present.
Serialize a hook invocation response for Command(resume=...).
Validate a resumed hook response against the outstanding request.
Return whether value looks like a Hooks v2 invocation interrupt.
Attach Hooks v2 snapshot identity and server event gates to context.
Return value when it is composed only of allowlisted sequences.
Return the project-scoped hooks configuration path.
Return the user-scoped hooks configuration path.
Load, validate, merge, and hash Hooks v2 configuration.
Return the canonical SHA-256 snapshot id for config.
Serialize configuration into a stable byte representation.
Decode one hooks document and fingerprint the exact bytes read.
Translate a hook permission decision into a client review outcome.
Interleave hook decisions with human decisions in request order.
Report whether a pre-execution hook already settled permission for a call.
Normalize a decoded value to the supported JSON type.
Normalize a decoded value to a JSON object.
Add a local marketplace to dcode state.
Add a marketplace from a pasted source string.
Remove a marketplace and every plugin installed from it.
Set the enabled state of an installed plugin.
Uninstall a plugin (disable, clear records, delete orphaned cache).
Install a marketplace plugin into the versioned cache and enable it.
Discover enabled marketplace plugins from their install cache paths.
List plugins from configured marketplaces.
Return plugin ids that have install records.
Return a marketplace source safe for display.
Redact credentials from every HTTP URL embedded in text.
Parse a user-provided marketplace source.
Load a marketplace source and return its local install location.
Load a marketplace from either a cached directory or JSON file.
Return a marketplace manifest path under root, if present.
Resolve or materialize a marketplace plugin entry to a plugin root.
Load a marketplace manifest from a root directory.
Build environment variables exposed to plugin subprocesses.
Substitute plugin path variables in a string.
Substitute plugin variables throughout a JSON-compatible value.
Return the first supported manifest path under root, if present.
Load a Claude/Codex plugin manifest.
Build component inventory for a plugin.
Set up the plugin CLI parser.
Execute a plugin management command.
Return the plugin storage root directory.
Return the data directory path for a plugin id without creating it.
Return the lazily-created data directory for a plugin id.
Return a bounded, collision-resistant filesystem key.
Return a cache key that cannot disclose source credentials.
Return the marketplace cache directory.
Return the versioned plugin install cache root.
Return the versioned cache path for a plugin id.
Load persisted marketplace records.
Persist a marketplace record.
Remove a marketplace record.
Load enabled plugin ids.
Persist a plugin enablement value.
Load installed plugin records.
Add or replace the record for plugin_id in installed_plugins.json.
Return the install entry for a plugin id.
Remove the install record for a plugin.
Copy a plugin into the versioned cache and register the install.
Disable a plugin, remove install records, and delete orphaned cache dirs.
Split a plugin id in {plugin}@{marketplace} form.
Return (skill_dir, subfolders) pairs found under source_path.
Async counterpart of discover_skill_dirs.
Load and namespace every skill found under a plugin source.
Async counterpart of load_namespaced_skills.
Qualify a skill name under its plugin namespace.
Return skill source tuples for plugin skills.
Return plugin skill roots for skill-content containment checks.
Discover plugin skill sources, containment roots, and loaded ids.
Discover plugin skill sources and containment roots.
Build hook sources from enabled or already-discovered plugins.
List the hook events a plugin declares, for display before it loads.
Namespace a plugin-declared MCP server's name under its plugin id.
List plugin MCP servers as (label, scoped_name, needs_login) tuples.
Return scoped MCP server names without preparing plugin runtime state.
Discover enabled plugins and compose their MCP config layers.
Build MCP config layers for enabled plugins.
Merge one skill into merged by name, last-one-wins.
Check whether a resolved skill directory has been trusted.
Persist trust for a resolved skill directory.
Remove trust for a skill directory.
Remove all trusted skill directories.
Return the sorted list of trusted skill directory paths.
Return trusted directories paired with their approval timestamps.
Return verified trusted skill directories as canonical Path objects.
Setup the skills subcommand parser with all its subcommands.
Execute skills subcommands based on parsed arguments.
List skills from built-in, user, and/or project directories.
Read the full raw SKILL.md content for a skill.
Discover skills and build pre-resolved containment roots.
Build the wrapped prompt and persisted metadata for a skill.
Execute a task with output directed to Textual UI.
Describe the reviewing model in the Auto notice body.
Reverse the XML escaping applied by the js_eval wire format.
Parse js_eval output into structured display blocks.
Return the newline-shortcut hint fragment (e.g. 'Ctrl+J newline').
Use the ASCII border variant when the active terminal requires it.
Keep blur from being interpreted as prompt dismissal.
Build a one-line summary of a run of tool calls.
Summarize an in-flight run, mixing past and present tense.
Return a human-readable provider label.
Return a compact brand label for a provider.
Return whether the style under the mouse points to a clickable link.
Open a URL after applying the shared URL safety check.
Open url in a browser and toast on failure.
Open the URL from a Rich link style on click, if present.
Build the style that marks a span as click-to-copy.
Return the copy text and field label from a span style, if any.
Coerce arbitrary tool-arg content into a displayable string.
Get the renderer for a tool by name.
Return whether startup tips should be shown.
Open the ChatGPT account page in the user's browser.
Return selection shifted past a diff row's gutter, if one is set.
Yield syntax-highlighted widgets for a unified diff.
Format addition/deletion counts as styled +N -M content.
Keep the bounded source prefixes needed to highlight a diff.
Return the provider policy that owns server_url.
Return the ChatGPT OAuth token store path.
Return the current ChatGPT OAuth sign-in state.
Return whether a ChatGPT OAuth token is stored on disk.
Delete the stored ChatGPT OAuth token.
Run the ChatGPT OAuth Authorization Code Flow with PKCE.
Construct a _ChatOpenAICodex model wired to the on-disk token store.
Create or connect to a sandbox of the specified provider.
Get the default working directory for a given sandbox provider.
Check that the required packages for a sandbox provider are installed.
Run a single task non-interactively and exit.
Best-effort error-type name for an exception from RemoteAgent.astream.
Render an exception from RemoteAgent.astream for the UI.
Build the server base URL.
Generate a langgraph.json config file for langgraph dev.
Poll a LangGraph server health endpoint until it responds.
Print every pending debug-preserved server-log path to stderr, once each.
Start a LangGraph server and return a connected remote agent client.
Async context manager that starts a server and guarantees cleanup.
Register the dcode config command group.
Dispatch a parsed config invocation.
Register the dcode auth command group.
Dispatch a parsed dcode auth invocation.
Dispatch dcode install <name>.
Install an optional extra or an arbitrary package via uv --with.
Dispatch a dcode tools subcommand.
Register the dcode mcp command group.
Handle dcode mcp login <server>.
Handle dcode mcp config.
Deep Agents Code - Interactive AI coding assistant.
Unified slash-command registry.
LangChain brand colors and semantic constants for the app.
Main entry point and loop.
Validation and environment-variable expansion for MCP server config.
Classifier-backed approval policy for the local interactive TUI.
Utilities for handling image and video media from clipboard and files.
Server-side helpers for drafting acceptance criteria from goal objectives.
UI-agnostic interaction interface for MCP OAuth login.
Textual UI application.
Ask user middleware for interactive question-answering during agent execution.
Agent management and creation.
Shared recursive types for JSON-compatible data.
External editor support for composing prompts.
Machine-readable JSON output helpers for CLI subcommands.
Storage paths for offloaded conversation history.
Update lifecycle for deepagents-code.
Schema and middleware for per-checkpoint state restored when resuming.
Reasoning effort support for /effort.
Goal tools exposed to the agent for persisted TUI goals.
Input handling utilities including image/video tracking and file mention parsing.
Approval-mode state shared by the Textual client and agent server.
Configuration, constants, and model creation.
MCP (Model Context Protocol) tools loader.
Server-side graph entry point for langgraph dev.
User-level credential storage for model providers.
Persistent store of MCP server names the user has disabled.
Canonical manifest and resolver for every user-tunable scalar config option.
Shared unified-diff helpers.
Protect machine-managed memory blocks from agent edits.
Canonical internal messages for goal state and work continuation.
Model configuration management.
External event ingress for the Textual app.
Help screens and argparse utilities for the app.
Terminal capability detection.
UI-agnostic helpers for resolving an MCP login target.
Middleware for runtime model selection via LangGraph runtime context.
Estimate and persist cumulative model cost for each thread.
Best-effort writer for terminal escape/control sequences.
Registry of pending actionable notifications.
Custom tools for the agent.
iTerm2 cursor guide workaround for Textual alternate-screen rendering.
CLI-specific conversation compaction middleware.
Auto-install pinned upstream binaries for optional tools.
Large paste collapsing for the chat input.
Lightweight text-formatting helpers.
One-time migration of legacy state files into ~/.deepagents/.state/.
The dcode doctor command: report install health and diagnostics.
Enumerate the tools available to the agent.
Helpers for tracking file operations and computing diffs for display.
First-run onboarding state for the interactive TUI.
Utilities for project root detection and project-specific configuration.
Rubric middleware retries for transient grader transport failures.
Thread management using LangGraph's built-in checkpoint persistence.
Subagent loader for app.
Clipboard utilities.
Inspect optional-dependency install status for the running distribution.
Unicode security helpers for deceptive text and URL checks.
Shared provider auth status formatting.
OAuth login flow and token storage for MCP servers.
Formatting utilities for tool call display in the app.
Middleware for injecting local context into system prompt.
Hook contracts and compatibility dispatch.
Lightweight hook dispatch for external tool integration.
Legacy dotted-event migration helpers for Hooks v2 configuration.
Standalone orchestration for the Hooks v2 execution engine.
Single-owner coordinator for client-side Hooks v2 state.
Client-owned conversation transcript projections for Hooks v2.
Canonical boundary between hook domain and wire models.
Bounded asynchronous command execution for Hooks v2.
Persistent workspace trust for project-scoped hooks.
Immutable runtime snapshots for Hooks v2 configuration.
Capability registry for Hooks v2 events.
Session-scoped client facade for the Hooks v2 runtime.
Event-aware reduction for Hooks v2 command output.
Client-side fulfillment for server-owned Hooks v2 interrupts.
Projection from Hooks v2 domain invocations to compatible wire input.
Sanitized subprocess environments for Hooks v2 command handlers.
Native dcode tool vocabulary mapped to compatible wire names.
Client↔server interrupt transport for Hooks v2 server-owned events.
Helpers for attaching Hooks v2 session identity to graph context.
User-facing presentation for Hooks v2 execution.
Terminal escape-sequence validation for hook output.
Validated Hooks v2 configuration loading, merging, and hashing.
Client-owned Hooks v2 lifecycle facade.
Translation between PermissionRequest decisions and HITL review payloads.
Server-owned Hooks v2 lifecycle middleware.
Typed contracts for the hooks system.
Cached runtime validators for hook model boundaries.
Versioned hook invocation transport models.
External JSON-compatible hook input and output models.
Validated hook configuration models.
Domain models for hook lifecycle invocations and decisions.
Built-in skills that ship with the Deep Agents Code.
Plugin support for dcode.
Plugin discovery, install, and enablement helpers.
Marketplace parsing for plugins.
Variable substitution for plugin-provided configuration.
Plugin manifest parsing for plugins.
CLI helpers for plugin management.
State storage for dcode plugin marketplaces, installs, and enablement.
Data models for plugins.
Plugin subsystem adapters.
Code-local skills middleware adapter for plugin namespaces.
Adapter from discovered plugins to SkillsMiddleware sources.
Adapter from plugin hook declarations to Hooks v2 configuration sources.
Adapter from plugin MCP declarations to dcode MCP config dictionaries.
Skills module for Deep Agents Code.
Shared skill-merge helper with override (name-collision) debug logging.
Trust store for skill directories that resolve outside trusted roots.
CLI commands for skill management.
Skill loader for CLI commands.
Helpers for loading and formatting skill invocations.
Textual user interface package for deepagents-code.
Textual UI adapter for agent execution.
Modal UI components.
Prompt for compacting a large resumed thread.
Interactive plugin manager screen.
Clickable tab labels for the plugin manager header.
Plugin manager state loading.
Plugin manager view models.
Pure plugin manager content builders.
Screen UI components.
Textual widgets for deepagents-code.
Welcome banner widget.
First-enable confirmation modal for Auto mode.
Notification settings screen for /notifications command.
Message store for virtualized chat history.
Trust prompt for skills that resolve outside trusted skill directories.
Ask user widget for interactive questions during agent execution.
Interactive model selector screen for /model command.
Progress modal for app self-update installs.
Message widgets.
Notification center modal for pending actionable notices.
Interactive agent selector screen for /agents command.
Autocomplete system for @ mentions and / commands.
Interactive reasoning effort selector for /effort.
Status bar widget.
Confirmation prompt for resuming a thread owned by another agent.
Generic detail modal for a single pending notification.
TUI screens for managing stored model-provider credentials.
Persistent inline display for the current goal.
In-TUI MCP OAuth login modal.
Approval widget for HITL - using standard Textual patterns.
Prompt for switching cwd when resuming or switching threads.
Command history manager for input persistence.
Confirmation modals for MCP changes that need a server restart.
Confirmation modal offered when a change needs an owned-server respawn.
Confirmation modals for /update dependency-refresh flows in the TUI.
Read-only in-app Debug Console modal.
First-enable confirmation modal before Shift+Tab enters YOLO.
Dedicated modal for the update-available notification.
Read-only MCP server and tool viewer modal.
Confirmation modal for /install <package> --package in the TUI.
Chat input widget for deepagents-code with autocomplete and history support.
Tool-specific approval widgets for HITL display.
Interactive thread selector screen for /threads command.
Tool renderers for approval widgets - registry pattern.
Live panel showing subagents fanned out from within js_eval calls.
Confirmation modal offered after reload-relevant plugin changes.
Loading widget with animated spinner for agent activity.
Onboarding screens for the interactive TUI.
Goal acceptance-criteria review widget.
Startup tip widget shown above the chat input.
ChatGPT OAuth sign-in screen, reachable via /auth -> openai_codex.
Renderers turning a unified diff into one Static per row.
Interactive theme selector screen for /theme command.
Provider-specific MCP OAuth dispatch.
Slack-hosted MCP OAuth provider.
Policy interface for provider-specific MCP OAuth quirks.
GitHub-hosted MCP OAuth provider.
Integrations for external systems used by the Deep Agents Code.
Discovery and instantiation of sandbox providers.
ChatGPT OAuth integration for the openai_codex model provider.
Parsing for the [sandboxes] section of ~/.deepagents/config.toml.
Sandbox lifecycle management with provider abstraction.
Sandbox provider interface used by Deep Agents Code.
Client-side transport and headless execution for Deep Agents Code.
Non-interactive execution mode.
Remote agent client — thin wrapper around LangGraph's RemoteGraph.
Local LangGraph server launch helpers for Deep Agents Code clients.
LangGraph server lifecycle management for the app.
Server lifecycle orchestration for the app.
Client-facing CLI command implementations.
CLI commands for inspecting the configuration surface.
CLI commands for the auth group: manage stored provider credentials.
CLI install path for optional deepagents-code extras.
The dcode tools command group: provision managed external tools.
CLI commands of the MCP module.
Tagged union of every persisted credential shape, narrowed by type.
Key for buffering an in-progress streamed tool call.
A whole tool-call arguments value delivered by a provider in one chunk.
Valid spinner display states, or None to hide.
Discriminated union for the ask_user widget Future result.
Element type of HITLResponse["decisions"].